#pragma once

#include "FibEvent/BaseFiberServer.h"
#include "HttpConfig.h"

using std::auto_ptr;

class HttpBaseAllocator
{
public:
	virtual ~HttpBaseAllocator(){}
	virtual void* Alloc(size_t) = 0;
	virtual void Free(void* ) = 0;
};

class BaseFiberClientHandler;

class HttpServer: public BaseFiberServer
{
public:
	HttpServer(void);
	~HttpServer(void);

public:
	static void* Alloc(size_t);
	static void Free(void*);
	bool ReadConfig(const _TCHAR*);

public:
	BaseFiberClientHandler* CreateFiberClientHandler();

public:
	static auto_ptr<HttpBaseAllocator> s_allocator;
	HttpConfig m_config;
};

